home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / ms.zip / ARC6_5.CHP < prev    next >
Text File  |  1993-06-15  |  3KB  |  75 lines

  1. %
  2. #EF
  3. #T15,1,Chapter 6     The Borland Graphics Interface     Pg. 17
  4. #HS,1,4,80,25,11,1
  5. #C4,R5
  6.                          ~W~IText Output With The BGI~Y~I
  7.  
  8. There are several text output functions for use in graphics modes. These
  9. are ~R~Idifferent functions ~Y~Ithan we would use when writing text in text mode.
  10.  
  11. #WN
  12. Borland provides us with a few standard fonts. Some fonts are |bitmapped|
  13. and some are |stroked|. In general, it is better to used stroked fonts than
  14. bitmapped fonts. In Space Attackers, we'll use one of each just to show how
  15. it's done.
  16.  
  17. #WN
  18. #C4,R15
  19. The Turbo C/Turbo C++ text output functions for graphics modes are
  20. summarized in Figure 6.3, which begins on the next page.
  21.  
  22. #WN
  23. %
  24. #EF
  25. #T15,1,Chapter 6     The Borland Graphics Interface     Pg. 18
  26. #HS,1,4,80,25,11,1
  27. #C2,R5
  28.                                   ~W~IFigure 6.3~Y~I
  29.                              Summary Of The BGI
  30.                   Text Output Functions For Graphics Modes
  31.  
  32. ╔═══════════════════════════════════════════════════════════════════════════╗
  33. ║ ~W~IName                   Purpose ~Y~I                                           ║
  34. ╙───────────────────────────────────────────────────────────────────────────╜
  35.   gettextsettings()      Gets information about the current font. Includes
  36.                          the size, direction, and justification.
  37.   outtext()              Outputs text in the current font at the current
  38.                          position.
  39.   outtextxy()            Outputs text in the current font at the position
  40.                          specified by the parameters x,y.
  41.   registerbgifont()      Tells the BGI that a font has been linked to the
  42.                          program. This is very similar to using
  43.                          registerbgidriver().
  44.   settextjustify()       Sets the text justification. Text may be left,
  45.                          center, or right justified on a specified point.
  46. #C28,R24
  47. ~C~IContinued On Next Page~Y~I
  48. #WP
  49. %
  50. #EF
  51. #T15,1,Chapter 6     The Borland Graphics Interface     Pg. 19
  52. #HS,1,4,80,25,11,1
  53. #C2,R5
  54.                               ~W~IFigure 6.3 (cont)~Y~I
  55.                              Summary Of The BGI
  56.                   Text Output Functions For Graphics Modes
  57.  
  58. ╔═══════════════════════════════════════════════════════════════════════════╗
  59. ║ ~W~IName                   Purpose ~Y~I                                           ║
  60. ╙───────────────────────────────────────────────────────────────────────────╜
  61.   settextstyle()         Sets the current font, the direction it's printed
  62.                          in, and the character size.
  63.   setusercharsize()      Sets the size of the current text fonts. This
  64.                          should really only be used with stroked fonts.
  65.                          The bitmapped fonts look terrible when you shrink
  66.                          or enlarge them.
  67.   textheight()           Returns the height in pixels of a text string.
  68.                          Good for helping you position text relative to a
  69.                          position on the screen.
  70.   textwidth()            Returns the width in pixels of a text string. Also
  71.                          very useful for calculating relative positions on
  72.                          the screen.
  73.  
  74. #WP
  75. #X